import 'package:love_app/common/su_dio.dart';
import 'package:love_app/config/path_url.dart';
import 'package:love_app/model/home_page_model.dart';
import 'package:love_app/model/response_model.dart';
import 'package:love_app/service/base_api.dart';

// 首页获取信息接口
class HomePageApi extends BaseApi{
  Future<HomePageModel> userInfo(String token)async{
    Map header = {
      "X-Auth-Token": token,
    };
    String path = PathUrl.homePageUser;
    ResponseModel responseModel = await SuDio().getRequest(path, headersMap: header);
    HomePageModel homePageModel = HomePageModel.fromJson(responseModel.toJsonModel);
    return homePageModel;
  }
}